import request from "@/utils/request";

// 查询员工列表信息
export const queryPageApi = (name,gender,begin,end,page,pageSize) =>{
    return request.get(`/emps?name=${name}&gender=${gender}&begin=${begin}&end=${end}&page=${page}&pageSize=${pageSize}`)
}

// 新增员工
export const addEmpApi = (data) =>{
    return request.post('/emps', data)
}

// 删除员工
export const deleteEmpApi = (ids) =>{
    return request.delete(`/emps?ids=${ids}`)
}

// 根据ID查询员工信息
export const queryByIdApi = (id) =>{
    return request.get(`/emps/${id}`)
}

// 修改员工
export const updateEmpApi = (emp) =>{
    return request.put('/emps', emp)
}